package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 数据采集变量对象 iot_variable
 * 公司名称：未可自动化 <br/>
 * 作者：weikeauto <br/>
 */
public class IotVariable extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    private Long id;

    /**
     * 设备模板id
     */
    @Excel(name = "设备模板id")
    private Long deviceTemplateId;

    /**
     * 变量名称
     */
    @Excel(name = "变量名称")
    private String variableName;

    /**
     * 变量单位
     */
    @Excel(name = "变量单位")
    private String variableUnit;

    /**
     * 变量类型：
     * 0 ->直采变量
     * 1 -> 运算型变量
     * 2 -> 录入型变量
     */
    @Excel(name = "变量类型： 0 ->直采变量 1 -> 运算型变量 2 -> 录入型变量")
    private Long variableType;

    /**
     * 寄存器
     */
    @Excel(name = "寄存器")
    private Long storage;

    /**
     * 寄存器尾数
     */
    @Excel(name = "寄存器尾数")
    private Integer serialNum;

    /**
     * 数据格式
     */
    @Excel(name = "数据格式")
    private Long dataFormat;

    /**
     * 采集频率
     */
    @Excel(name = "采集频率")
    private Long acquisitionFrequency;

    /**
     * 数字格式
     */
    @Excel(name = "数字格式")
    private Integer numberFormat;

    /**
     * 存储方式：
     * 0->变化存储
     * 1->全部存储
     */
    @Excel(name = "存储方式： 0->变化存储 1->全部存储")
    private Long storageMethod;

    /**
     * 读写方式：
     * 0->读写
     * 1->只读
     * 2->只写
     */
    @Excel(name = "读写方式： 0->读写 1->只读 2->只写")
    private Long readWriteWay;

    private Long  showData;

    private Long  userOpen;


    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setDeviceTemplateId(Long deviceTemplateId) {
        this.deviceTemplateId = deviceTemplateId;
    }

    public Long getDeviceTemplateId() {
        return deviceTemplateId;
    }

    public void setVariableName(String variableName) {
        this.variableName = variableName;
    }

    public String getVariableName() {
        return variableName;
    }

    public void setVariableUnit(String variableUnit) {
        this.variableUnit = variableUnit;
    }

    public String getVariableUnit() {
        return variableUnit;
    }

    public void setVariableType(Long variableType) {
        this.variableType = variableType;
    }

    public Long getVariableType() {
        return variableType;
    }

    public void setStorage(Long storage) {
        this.storage = storage;
    }

    public Long getStorage() {
        return storage;
    }

    public void setSerialNum(Integer serialNum) {
        this.serialNum = serialNum;
    }

    public Integer getSerialNum() {
        return serialNum;
    }

    public void setDataFormat(Long dataFormat) {
        this.dataFormat = dataFormat;
    }

    public Long getDataFormat() {
        return dataFormat;
    }

    public void setAcquisitionFrequency(Long acquisitionFrequency) {
        this.acquisitionFrequency = acquisitionFrequency;
    }

    public Long getAcquisitionFrequency() {
        return acquisitionFrequency;
    }

    public void setNumberFormat(Integer numberFormat) {
        this.numberFormat = numberFormat;
    }

    public Integer getNumberFormat() {
        return numberFormat;
    }

    public void setStorageMethod(Long storageMethod) {
        this.storageMethod = storageMethod;
    }

    public Long getStorageMethod() {
        return storageMethod;
    }

    public void setReadWriteWay(Long readWriteWay) {
        this.readWriteWay = readWriteWay;
    }

    public Long getReadWriteWay() {
        return readWriteWay;
    }

    public Long getShowData() {
        return showData;
    }

    public void setShowData(Long showData) {
        this.showData = showData;
    }

    public Long getUserOpen() {
        return userOpen;
    }

    public void setUserOpen(Long userOpen) {
        this.userOpen = userOpen;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("deviceTemplateId", getDeviceTemplateId())
                .append("variableName", getVariableName())
                .append("variableUnit", getVariableUnit())
                .append("variableType", getVariableType())
                .append("storage", getStorage())
                .append("serialNum", getSerialNum())
                .append("dataFormat", getDataFormat())
                .append("acquisitionFrequency", getAcquisitionFrequency())
                .append("numberFormat", getNumberFormat())
                .append("storageMethod", getStorageMethod())
                .append("readWriteWay", getReadWriteWay())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
